home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 889 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  31 lines

  1.  
  2. In article <4d1bo9$rh6@inferno.mpx.com.au> nring@jolt.mpx.com.au (Nick Ring) writes:
  3.  > Roland Bengtsson (roland.bengtsson@mbox3.swipnet.se) wrote:
  4.  > : I wanted to make som ASCII-tables in Arexx, but I can't find any
  5.  > : function similar to printf()  C. Any advice?
  6.  > 
  7.  > : It maybe look like this:
  8.  > 
  9.  > :  1 One             540      230       0.08
  10.  > :  2 Two           -1942     2621
  11.  > :  3 Three            80      210       0.00
  12.  > :  4 Four          13522     1522       0.06
  13.  > 
  14.  > To my knowledge, there is function in ARexx to do this. The only way for 
  15.  > you to get this result, is to do it yourself. To make it worse, ARexx is 
  16.  > dataless, which means that %f (float in C?) doesn't mean as they are all 
  17.  > treated as strings of bytes (%s would most likely be the closest in C).
  18.  >
  19.         Use of right() and left() should do for column alignment, however
  20. limiting floats to 2 decimal places may be more difficult.
  21.  
  22.   say right(index,3) || left(name,10) || right(num1,8) || right(num2,8)...
  23.  
  24. -- 
  25.  > ============================================================ <
  26.  >   wulfraed@netcom.com  | Wulfraed  Dennis Lee Bieber  KD6MOG <
  27.  >   D.Bieber@GEnie.com   |      FurryMUCK and FurToonia        <
  28.  > ============================================================ <
  29.  >          PGP key: Finger wulfraed@netcom.com                 <
  30.  > Home Page: ftp://ftp.netcom.com/pub/wu/wulfraed/wulfraed.htm <
  31.